package oop多态作业;

import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;
import oop继承第一章.Benchi;
import java.util.Scanner;
public class Bacon extends  Pizza{
    private  int grammage;

    public int getGrammage() {
        return grammage;
    }

    public void setGrammage(int grammage) {
        this.grammage = grammage;
    }



    public Bacon() {
    }
    public Bacon( String  name, double pirce, int size ,int grammage){
        super(name,pirce,size);
        this.name=name;
        this.price=pirce;
        this.size=size;
        this.grammage=grammage;
    }
    public void show(){
        System.out.println("名称："+super.getName());
        System.out.println("价格："+super.getPrice()+"元");
        System.out.println("大小："+super.getSize()+"寸");
        System.out.println("克数："+this.grammage);
    }
}
